// ModifyVarTable.h : stores the statement and procedures which modify each variable.
// Author: Achyut P Balaji
//

#ifndef MODIFY_VAR_TABLE_H
#define MODIFY_VAR_TABLE_H
#include"SPA_Data_Types.h"

using namespace std;


class ModifyVarTable {
private:
	vector<VAR_INDEX> varIndex;
	vector<STMT_LIST> stmtModifiedIn;
	vector<PROC_LIST> procModifiedIn;
	static ModifyVarTable *obj;
	ModifyVarTable();
public:
	static ModifyVarTable* getInstance();
	BOOLEAN addStmt(VAR_INDEX v, STATEMENT_INDEX n);
	BOOLEAN addProc(VAR_INDEX v, PROC_INDEX p);
	BOOLEAN isModified(INDEX n, VAR_INDEX ind, VECTORLIST_TYPE type);
	STMT_LIST getStmtModifiedIn(VAR_INDEX v);
	PROC_LIST getProcModifiedIn(VAR_INDEX v);
	void initialise(int size);
};
#endif